
document.addEventListener("DOMContentLoaded", function(event) { 
	document.getElementById("saveButton").addEventListener("click",savePort);
});

savePort = function(){
	var port = document.getElementById("smartKiwiPort").value;
	chrome.storage.sync.set({'smartKiwiPort': port}, function() {
          // Notify that we saved.
          alert('Settings saved');
        });
}; 